/********************************** (C) COPYRIGHT *******************************
* File Name          : OLED.h
* Author             : YHR
* Version            : V1.0
* Date               : 2021/08/20
* Description        :
*******************************************************************************/
#ifndef __OLED_H
#define __OLED_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "SGUI_Typedef.h"
#include "I2C.h"

/********************************************************************************
 *                                   FUNCTIONS
 ********************************************************************************/
void OLED_WriteCmd(UINT8 cmd);
void OLED_WriteData(UINT8 data);
void OLED_RefreshGram(void);
void OLED_Clear(void);
void OLED_DisplayOn(void);
void OLED_DisplayOff(void);
void OLED_DrawPoint(UINT8 x, UINT8 y, UINT8 s);
void OLED_Fill(UINT8 x1, UINT8 x2, UINT8 y1, UINT8 y2, UINT8 s);
void OLED_ShowChar(UINT8 x, UINT8 y, UINT8 ch, UINT8 size);
UINT32 MyPow(UINT8 m, UINT8 n);
void OLED_ShowNum(UINT8 x, UINT8 y, UINT32 num, UINT8 len, UINT8 size);
void OLED_ShowString(UINT8 x, UINT8 y, UINT8 *p, UINT8 size);
void OLED_Init(void);
void OLED_Show16x16Pic(UINT8 x, UINT8 y, const unsigned char *pic);
void OLED_Show32x16Pic(UINT8 x, UINT8 y, const unsigned char *pic);
void OLED_Show18x32Pic(UINT8 x, UINT8 y, const unsigned char *pic);


void SGUI_SDK_SetPixel(SGUI_INT iX, SGUI_INT iY, SGUI_INT iColor);
SGUI_INT SGUI_SDK_GetPixel(SGUI_INT iX, SGUI_INT iY);
void SGUI_SDK_ClearDisplay(void);
void SGUI_SDK_RefreshDisplay(void);

/********************************************************************************
*********************************************************************************/

#ifdef __cplusplus
}
#endif

#endif
